package com.example.memory.controller;

import com.example.memory.base.controller.BaseController;
import com.example.memory.entity.File;
import com.example.memory.servicde.FileService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

@RestController
@RequestMapping("/file")
public class FileController extends BaseController<File> {
    @Resource
    FileService fileService;

    @GetMapping("/getResource")
    public void getResource(HttpServletRequest request, HttpServletResponse response) throws IOException {
        fileService.getResource(request, response);
    }
}
